package com.stx.user.action;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.stx.user.service.UserService;
import com.stx.user.vo.UserVO;

public class UserAction extends ActionSupport implements SessionAware {

	private Map<String, Object> session;
	private UserService userservice;
	private UserVO uservo = null;
	private UserVO userReturn = null;
	private String userID = null;
	private List<UserVO> userList = new ArrayList<UserVO>();
	private String confirmPassword;
	private String error;

	public String listUser() {

		return "listUser";
	}

	public String findUserByUesrName() {

		return "login";
	}

	public String addUser() {
		return "input";
	}

	public String deleteUser() {
		return "listUser";
	}

	public String editUser() {
		return "editUser";
	}

	public String getUserByUserID() {
		return "getUser";
	}

	
	
	
	
	
	
	
	
	public UserService getUserservice() {
		return userservice;
	}

	
	
	
	
	public void setUserservice(UserService userservice) {
		this.userservice = userservice;
	}

	public UserVO getUservo() {
		return uservo;
	}

	public void setUservo(UserVO uservo) {
		this.uservo = uservo;
	}

	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	public List<UserVO> getUserList() {
		return userList;
	}

	public void setUserList(List<UserVO> userList) {
		this.userList = userList;
	}

	public String getConfirmPassword() {
		return confirmPassword;
	}

	public void setConfirmPassword(String confirmPassword) {
		this.confirmPassword = confirmPassword;
	}

	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}

	public UserVO getUserReturn() {
		return userReturn;
	}

	public void setUserReturn(UserVO userReturn) {
		this.userReturn = userReturn;
	}

	@Override
	public void setSession(Map<String, Object> session) {

		this.session = session;

	}

	public Map<String, Object> getSession() {
		return session;
	}

}
